storage "s3" {
  access_key  = "{{ vault_s3_access_key }}"
  secret_key  = "{{ vault_s3_secret_key }}"
  bucket      = "{{ vault_s3_bucket }}"
  region      = "{{ vault_s3_region }}"
  disable_ssl = "{{ vault_s3_disable_ssl }}"

  vault_s3_max_parallel = "{{ vault_s3_max_parallel }}"

  {% if vault_s3_endpoint is defined and vault_s3_endpoint|length -%}
  endpoint = "{{ vault_s3_endpoint }}"
  {% endif %}
  {% if vault_s3_kms_key_id is defined and vault_s3_kms_key_id|length -%}
  kms_key_id = "{{ vault_s3_kms_key_id }}"
  {% endif %}
  {% if vault_s3_session_token is defined and vault_s3_session_token|length -%}
  session_token = "{{ vault_s3_session_token }}"
  {% endif %}

  s3_force_path_style = "{{ vault_s3_force_path_style }}"
}
